package org.planaz.campusvoting.controller;

import jakarta.annotation.Resource;
import org.planaz.campusvoting.common.result.Result;
import org.planaz.campusvoting.service.EmailService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/email")
public class EmaiController {

    @Resource
    private EmailService emailService;

    @PostMapping("/sendEmail")
    public Result<?> sendEmail(String email, String type){
        return emailService.sendEmail(email, type);
    }

}
